package com.jl.jlapp.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ActivityInformationByIdModel;
import com.jl.jlapp.eneity.ActivityInformationByIdModel.ResultDataBean.CouponInformationBean;
import java.util.Date;
import java.util.List;

public class ActivityNameCouponListAdapter
  extends BaseQuickAdapter<CouponInformationBean, BaseViewHolder>
{
  public ActivityNameCouponListAdapter(@LayoutRes int paramInt, @Nullable List<CouponInformationBean> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, CouponInformationBean paramCouponInformationBean)
  {
    paramBaseViewHolder.setText(R.id.coupon_price, paramCouponInformationBean.getPrice() + "");
    paramBaseViewHolder.setText(R.id.coupon_use_limit, paramCouponInformationBean.getUseLimit() + "");
    long l = paramCouponInformationBean.getEndTime();
    if (new Date().getTime() - l > 0L)
    {
      paramBaseViewHolder.getView(R.id.coupon_background).setBackgroundResource(R.drawable.bg_rectangle);
      paramBaseViewHolder.setText(R.id.get_coupon, "已失效");
      return;
    }
    paramBaseViewHolder.addOnClickListener(R.id.get_coupon);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/ActivityNameCouponListAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */